<template>
	<view class="content">
		<userSelect v-if="showUser" :list="userList" @cancelConfirm="closeUser" @onConfirm="onConfirm"></userSelect>
		<view class="section-0">
			<view class="section-body">
				<view class="wrapper">
					<view class="title">
						扣分
						<text class="tip">
							<text class="iconfont icon-tishi"></text>
							每分项扣分最多不超过本分项标准分值
						</text>
					</view>
					<view class="value l-value">
						<view class="point">
							<view class="slider-bar">
								<u-slider v-model="value" min="0" max="100"></u-slider>
							</view>
							<view class="point-value">
								<text>{{value}}</text>分
							</view>
						</view>
					</view>
				</view>
				<view class="wrapper">
					<view class="title">
						责任人
						<image @click="openUser" mode="aspectFit" class="image" src="../../../../../../../src/imgs/todo-info-icon-user.png" alt="">
					</view>
					<view class="value l-value">
						<view class="user">
							{{userList.map(item => item.nick_name).join('，')}}
						</view>
					</view>
				</view>
				<view class="wrapper wrapper-title">
					<view class="title">扣分原因</view>
					<view class="value l-value">
						<view class="textarea">
							<u--textarea :maxlength="-1" placeholderClass="textarea-placeholder" class="textarea-body"
								placeholder="输入扣分原因..." v-model="memo" border='null'></u--textarea>
						</view>
						<view class="rule">
							<view class="rule-title">评分详情</view>
							<view class="rule-content">
								（1）各分项评分满分为100分，各分项评分的实得分应为分项评分表各评分项目实得分之和；<br>
								（2）分项评分表中各评分项目的实得分不应采用负值，扣减分数总和不得超过该评分项目应得分;<br>
								（3）评分项目有缺项的，分项评分实得分=可评分项目实得分之和÷可评分项目应得分之和×100；<br>
								（4）单项评分实得分应为其4个分项实得分的加权平均值。相应分项的权数分别为0.3、0.2、0.3、0.2。
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import userSelect from '@/components/user_select/index.vue';
	export default {
		components: {
			userSelect
		},
		data() {
			return {
				memo: '',
				value: 0,
				showUser: false,
				userList: []
			}
		},
		methods: {
			openUser() {
				this.showUser = true;
			},
			onConfirm(res) {
				this.closeUser();
				this.userList = res;
			},
			closeUser() {
				this.showUser = false;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pop-container{
		width: 670rpx;
		height: 400rpx;
		background-color: #fff;
		border-radius: 35rpx;
	}
	.section-0{
		width: 100%;
		background-color: #2d5dfd;
		.section-body{
			background-color: #fff;
			border-top-left-radius: 50rpx;
			border-top-right-radius: 50rpx;
			background-color: #fff;
			box-sizing: border-box;
			padding: 0 40rpx;
			padding-top: 35rpx;
			.wrapper{
				width: 100%;
				border-radius: 35rpx;
				background-repeat: no-repeat;
				overflow: hidden;
				box-sizing: border-box;
				box-shadow: 0 0 20rpx 10rpx rgba(#bcbcb5, 0.17);
				padding: 28rpx 40rpx;
				margin-bottom: 28rpx;
				.label {
					width: 135rpx;
					float: left;
					font-size: 26rpx;
					font-stretch: normal;
					height: 48rpx;
					line-height: 48rpx;
					letter-spacing: 0px;
					color: #46464a;
				}
			
				.title {
					width: 100%;
					height: 30rpx;
					line-height: 30rpx;
					border-bottom: solid 3rpx #f2f2f0;
					font-size: 26rpx;
					font-stretch: normal;
					letter-spacing: 0rpx;
					color: #46464a;
					padding-bottom: 28rpx;
					.image{
						display: inline-block;
						float: right;
						height: 30rpx;
						width: 50rpx;
					}
					.tip{
						float: right;
						font-size: 16rpx;
						color: #7f98ae;
					}
					.iconfont {
						font-size: 16rpx;
						color: #7f98ae;
						margin-right: 3rpx;
					}
				}
			
				.value {
					float: left;
					width: 445rpx;
					.user{
						line-height: 30rpx;
						font-size: 26rpx;
						color: #1534ce;
						padding-top: 20rpx;
					}
					.point{
						width: 100%;
						@include clear();
						display: flex;
						align-items: center;
						.slider-bar{
							float: left;
							width: calc(100% - 120rpx);
						}
						.point-value{
							text-align: right;
							float: left;
							width: 120rpx;
							font-size: 22rpx;
							color: #3b3c40;
							text{
								display: inline-block;
								width: 71rpx;
								height: 24rpx;
								background-color: #cbcbcd;
								border-radius: 11rpx;
								text-align: center;
								font-weight: normal;
								font-stretch: normal;
								line-height: 24rpx;
								letter-spacing: 0rpx;
								margin-right: 10rpx;
							
							}
						}
					}
					.rule {
						width: 100%;
						border-top: solid 1rpx #f2f2f0;
						.rule-title{
							padding-top: 60rpx;
							padding-bottom: 35rpx;
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 34rpx;
							color: #8497ac;
						}
						.rule-content{
							width: 100%;
							font-size: 17rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 33rpx;
							letter-spacing: 0rpx;
							color: #3b3c40;
					}
					}
					.audio {
						width: 50rpx;
						height: 50rpx;
						background-color: #ffffff;
						border-radius: 50%;
						box-shadow: 0 0 20rpx 10rpx rgba(#bcbcb5, 0.17);
						overflow: hidden;
			
						.audio-center {
							margin-top: 13rpx;
							margin-left: 13rpx;
							border-radius: 50%;
							width: 24rpx;
							height: 24rpx;
							background-color: #ed451b;
						}
					}
			
					.upload-wrap {
						width: 100%;
						min-height: 48rpx;
						border-radius: 20rpx;
						border: solid 2rpx #0535d6;
						position: relative;
			
						.iconfont {
							position: absolute;
							right: 25rpx;
							line-height: 44rpx;
							color: #1534ce;
							font-size: 28rpx;
						}
					}
			
					.date {
						width: 100%;
						height: 48rpx;
						border-radius: 20rpx;
						border: solid 2rpx #0535d6;
						line-height: 48rpx;
						position: relative;
						font-size: 26rpx;
						color: rgba(0, 0, 0, 0.7);
						box-sizing: border-box;
						padding-left: 20rpx;
						text-align: center;
						color: #0535d6;
			
						.iconfont {
							position: absolute;
							right: 25rpx;
							top: 2rpx;
							font-size: 30rpx;
							color: #dad9df;
						}
					}
			
					.picker {
						width: 100%;
						height: 48rpx;
						border-radius: 20rpx;
						border: solid 2rpx #0535d6;
						line-height: 48rpx;
			
						text {
							font-size: 26rpx;
							letter-spacing: 0rpx;
							color: rgba(#46464a, 0.5);
							margin-left: 28rpx;
						}
			
						.iconfont {
							float: right;
							font-size: 32rpx;
						}
					}
			
					.input {
						padding-top: 18rpx;
			
						.input-body {
							box-sizing: border-box;
							width: 100%;
							height: 44rpx;
							padding: 0 !important;
							border: none;
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: rgba(0, 0, 0, 0.7);
						}
			
						.input-placeholder {
							font-size: 26rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: rgba(0, 0, 0, 0.5);
						}
					}
			
					.textarea {
						width: 100%;
						height: 300rpx;
						line-height: 30rpx;
			
						.textarea-body {
							box-sizing: border-box;
							width: 100%;
							height: 300rpx;
							border: none;
							padding: 18rpx 0rpx !important;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
			
							/deep/ .u-textarea__field {
								height: auto !important;
								font-size: 25rpx;
							}
						}
			
						/deep/ .u-textarea--disabled {
							background-color: #fff;
						}
			
						.textarea-placeholder {
							font-size: 25rpx;
							font-weight: normal;
							font-stretch: normal;
							line-height: 50rpx;
							letter-spacing: 3rpx;
							color: rgba(0, 0, 0, 0.5);
						}
					}
				}
			
				.l-value {
					width: 100%;
				}
			
				
			}
		}
	}
</style>
